<?php
namespace app\index\controller;
use think\Controller;
use app\index\controller\Rest;
		class Deng extends Controller
		{
			public function user(){
				$user=\input("post.user");
				$pass=\input("post.pass");
				$data["user"]=$user;
				$data["pass"]=$pass;
				header("Access-Controller-Allow-Origin:*");
				header("Content-Type:application/json");//x-www-form-urlencoded
				$json=\json_encode($data);
				return $json;
				
			}
			public function phone(){
				
				$phone=input("post.a");
				$data["info"]=$phone;
				header("Access-Control-Allow-Origin:http://localhost:8080");

				 $r=rand(1000,9999);
				 $data["rand"]=$r;
				sendTemplateSMS($phone,array($r,1),"1");	
				return json($data);
				
			}
		}